def p1=new Person()
p1.name='kk'
p1.age=20
println p1


p2 = new Person(['name':'xiaox','age':18])
println p2
// per2 = new Person('name':'qqq','age':10)
// per2.speak 2


class Person{
	def name
	def age
	//覆盖Object类的toString方法
	//声明返回值为String 默认不用return
	String toString(){
		"I am $name ,i'm $age."
	void speak(int ha){
	}
		println name + ","+ha;
		def name = "James"
		def text = """
		hello there ${name}
		how are you today?
		"""
		println text
	}
}

